package weixinkeji.dev.power.center.h;

import com.alibaba.fastjson.JSON;
import sys.wx.ann.hm.H;
import sys.wx.ann.hm.M;
import sys.wx.ann.power.head.GL;
import sys.wx.c.ATR;
import sys.wx.m.db.dao.mysql.Dao;
import weixinkeji.dev.power.center.bean.SysP;
import weixinkeji.dev.power.center.service.URPService;
import weixinkeji.dev.power.center.so.URPSQL;

/**
 *
 * @author IK
 */

@H("weixinkeji/dev/power/center/sysup/manager/s")
@GL
public class SysUPSManager {

    ATR a;                  //ATR是必须要的。它封装了web请求的相关信息

    public SysUPSManager(ATR obj) {     //这个有参构造函数，也是必须的。它进行附值
        this.a = obj;
    }

    /**
     * 查询出用户所拥有的角色。及权限
     *
     * @return
     */
    @M("/userPower")//weixinkeji/dev/power/center/sysur/manager/s/userRole1N.imy
    public String ur1N() {
        a.printOne(JSON.toJSONString(
                Dao.selectVast_My(SysP.class, URPSQL.SELECT_UP_USERID.replace("?1", a.request.getParameter("uID")))
        ));
        return null;
    }

    @M("/userRole1NLigerui")//weixinkeji/dev/power/center/sysur/manager/s/userRole1N.imy
    public String ur1NLigerui() {
        a.printOne(JSON.toJSONString(URPService.getURByUserID(a.request.getParameter("uID"))));
        return null;
    }

   

}
